<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/elec/elecPile.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>设备管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>增加桩信息</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">增加桩信息</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="addElecPile">
                        <input name="elecStationId" id="elecStationId" value="${elecStation.elecStationId}"
                               type="hidden">
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">所属桩群：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" value="${elecStation.stationName}" readonly>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">桩名称：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="pileName" name="pileName">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">设备类型：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="pileType" id="pileType">
                                    <option value="">--请选择--</option>
                                    <option value="1">直流设备</option>
                                    <option value="2">交流设备</option>
                                    <option value="3">交直流一体设备</option>
                                    <option value="4">无线设备</option>
                                    <option value="6">充电插座</option>
                                    <option value="5">其他</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">电桩类型：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="pileElecType" id="pileElecType">
                                    <option value="1">单直流</option>
                                    <option value="2">单交流</option>
                                    <option value="3">双直流</option>
                                    <option value="4">双交流</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">桩终端逻辑地址类型：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="pileRtuaType" id="pileRtuaType">
                                    <option value="0">12位长度</option>
                                    <option value="1">8位长度</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">充电服务器域名：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="elecServerDomain" id="elecServerDomain">
                                    <option value="STD_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'STD_DOMAIN'}">selected</c:if>  >
                                        瑞晨云标准协议(STD_DOMAIN)
                                    </option>
                                    <option value="ZC_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'ZC_DOMAIN'}">selected</c:if> >
                                        智充协议(ZC_DOMAIN)
                                    </option>
                                    <option value="SH_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'SH_DOMAIN'}">selected</c:if>  >
                                        盛弘协议(SH_DOMAIN)
                                    </option>
                                    <option value="YL_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'YL_DOMAIN'}">selected</c:if>  >
                                        永联协议(YL_DOMAIN)
                                    </option>
                                    <option value="LNC_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'LNC_DOMAIN'}">selected</c:if>  >
                                        绿能(LNC_DOMAIN)
                                    </option>
                                    <option value="JN_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'JN_DOMAIN'}">selected</c:if>  >
                                        京能(JN_DOMAIN)
                                    </option>
                                    <option value="APL_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'APL_DOMAIN'}">selected</c:if>  >
                                        爱普拉(APL_DOMAIN)
                                    </option>
                                    <option value="YC_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'YC_DOMAIN'}">selected</c:if>  >
                                        易充(YC_DOMAIN)
                                    </option>
                                    <option value="RS_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'RS_DOMAIN'}">selected</c:if>  >
                                        锐速(RS_DOMAIN)
                                    </option>
                                    <option value="YKR_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'YKR_DOMAIN'}">selected</c:if>  >
                                        英可瑞(YKR_DOMAIN)
                                    </option>
                                    <option value="DC_DOMAIN"
                                            <c:if test="${tenant.elecServerDomain eq 'DC_DOMAIN'}">selected</c:if>  >
                                        鼎充(DC_DOMAIN)
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">分流器：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="elecServerSpliter" id="elecServerSpliter">
                                    <option value="0"
                                            <c:if test="${tenant.elecServerSpliter eq '0'}">selected</c:if>  >0
                                    </option>
                                    <option value="1"
                                            <c:if test="${tenant.elecServerSpliter eq '1'}">selected</c:if>  >1
                                    </option>
                                    <option value="2"
                                            <c:if test="${tenant.elecServerSpliter eq '2'}">selected</c:if>  >2
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">额定电流：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="current" name="current">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">额定电压：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="voltage" name="voltage">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">额定功率 单位(KW)：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="power" name="power">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">是否有车位：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="hasParking" name="hasParking">
                                    <option value="0">是</option>
                                    <option value="1">否</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">车位号：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="parkingNo" name="parkingNo">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">是否有地锁：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="hasLock" name="hasLock">
                                    <option value="0">否</option>
                                    <option value="1">是</option>
                                </select>
                            </div>
                        </div>


                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">地锁编号：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="lockNo" name="lockNo">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">地锁状态：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="lockStatus" name="lockStatus">
                                    <option value="0">关闭</option>
                                    <option value="1">开启</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">设备生产商：</label>
                            <div class="col-sm-8">
                                <c:choose>
                                    <c:when test="${!empty tenantManufacturerList }">
                                        <select class="form-control" name="manufacturerId" id="manufacturerId">
                                            <option value="0">--请选择--</option>
                                            <c:forEach items="${tenantManufacturerList}" var="manufacturer">
                                                <option value="${manufacturer.manufacturerId}">${manufacturer.manufacturerName}</option>
                                            </c:forEach>
                                        </select>
                                    </c:when>
                                    <c:otherwise>
                                        <input type="text" class="form-control" value="" name="manufacturerId" placeholder="请先添加设备生产商信息"
                                               readonly>
                                    </c:otherwise>
                                </c:choose>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">运营状态：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="operateStatus" name="operateStatus">
                                    <option value="0">未上线</option>
                                    <option value="1">上线</option>
                                    <option value="2">下线</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">桩状态：</label>
                            <div class="col-sm-8">
                                <select class="form-control" id="pileStatus" name="pileStatus">
                                    <option value="0">无</option>
                                    <option value="1">正常</option>
                                    <option value="2">整改</option>
                                    <option value="2">拆除</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">备注：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="remark" name="remark">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-3 col-sm-offset-8 text-right">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">


    layui.use('laydate', function () {
        var laydate = layui.laydate;
        var logoutTime = laydate.render({
            elem: '#logoutTime',
            type: 'datetime',
            format: 'yyyy-MM-dd HH:mm:ss',
            trigger: 'click',

        });
    });


    addElecPile.init();
</script>
</body>
</html>
